<template>
	<view class="container">
		<view class="list flex flex-align flex-bt" v-for="(item,index) in articleList" :key='index' @click="go_url('/pages/xieyi/xieyi_details?id='+item.id)">
			<view class="left text_two">{{item.name}}</view>
			<tui-icon name="arrowright" :size="26" color="#999999"></tui-icon>
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: 'Hello',
				name:'',
				id_card:'',
				bank_num:'',
				index:0,
				mobile:'',
				yzm:'',
				articleList:[],
				page:1
			}
		},
		onLoad() {
	
		},
		onShow() {
			this.page=1
			this.articleList = []
			this.getList()
		},
		onReachBottom() {
			this.page++
			this.getList()
		},
		methods: {
			go_url(e){
				console.log(e)
				let that = this
				that.tui.href(e)
			},
			getList(){
				let that = this
				that.tui.request("api.nutrition/ruleList", "GET", {page:that.page}, false, true, true).then((res) => {
					console.log(res)
					// that.tui.toast(res.info)
					that.articleList = that.articleList.concat(res.data.list)
					
				}).catch((res) => {})
			},
		}
	}
</script>

<style lang="scss">
	page{background: #f5f5f5;padding-top: 30rpx;}
	.grey{color: #b3b3b3;}
	.list{padding: 15rpx 20rpx 15rpx 40rpx;background: #fff;margin: 0rpx 0 30rpx;
		.left{width: 700rpx;}
		.uni-input{padding:0 6rpx;}
	}
	.bank_btn{margin: 160rpx 30rpx;}
</style>